package com.station.search.domain.converter;

import com.station.search.domain.StationQuestion;
import com.station.search.domain.dto.StationQuestionDTO;
import com.station.search.domain.vo.StationQuestionVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * @author: JT
 * @date: 2021/10/26
 * @Title:
 */
@Mapper
public interface StationQuestionConverter {

    StationQuestionConverter INSTANCE = Mappers.getMapper(StationQuestionConverter.class);

    @Mapping(source = "questionDate", target = "questionDate", dateFormat = "yyyy-MM-dd HH:mm:ss")
    StationQuestion voToDo(StationQuestionVO stationQuestionVO);

    StationQuestionDTO doToDto(StationQuestion question);
}
